package com.oa.jixiao.biz;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.oa.jixiao.dao.AssessmentMapper;
import com.oa.jixiao.entity.Assessment;
import com.oa.login.dao.EmpMapper;
import com.oa.login.entity.Emp;

@Service
public class AssessmentBiz {
	
	@Resource
	private EmpMapper empMapper;
	
	@Resource
	private AssessmentMapper assessMapper;
	
	public List<Emp> findAll(String name){
		return empMapper.findAll(name);
	}
	
	public int save(Assessment record){
		return assessMapper.insertSelective(record);
	}
	
	public int findByNameAndNumber(Assessment record){
		return assessMapper.findByNameAndMonth(record);
	}
	
	public List<Assessment> totalScore(int month){
		return assessMapper.totalScore(month);
	}
}
